package com.csdj.questions.service;

import com.csdj.questions.entity.Article;
import com.csdj.questions.mapper.ArticleMapper;
import com.csdj.questions.service.IArticleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 文章 服务实现类
 * </p>
 *
 * @author 刘宇
 * @since 2022-03-08
 */
@Service
public class ArticleService extends ServiceImpl<ArticleMapper, Article> implements IArticleService {

    @Resource
    private ArticleMapper articleMapper;

    /**
     * 查询全部，搜索框热点，按倒序排列
     * @return
     */
    @Override
    public  List<Article> getInfoArticle() {
        List<Article> list = articleMapper.getInfoArticle();
        return list;
    }
}
